<template>
    <ModalPopup v-model:is-show="showModal" @confirm="confirm">

        <template #content>
            <view class="w-full flex flex-col items-center text-xl font-medium leading-8 ">
                <view>
                    <text>请先阅读并同意</text>
                </view>
                <view class="flex flex-row  items-center">
                    <navigator class="text-primary" url="/pages/" open-type="navigate" hover-class="navigator-hover">
                        《服务协议》
                    </navigator>
                    和
                    <navigator class="text-primary" url="/pages/" open-type="navigate" hover-class="navigator-hover">
                        《隐私协议》
                    </navigator>
                </view>
            </view>
        </template>
    </ModalPopup>
</template>
<script setup lang="ts">
import ModalPopup from "@/components/popup/modal.vue"
const showModal = ref(false)
defineOptions({
    name: "modalAgreement"
})
interface IEmits {
    (e: "confirm"): void
}
const emits = defineEmits<IEmits>()
function confirm() {
    emits('confirm')
    showModal.value = false
}
function open() {
    showModal.value = true
}
defineExpose({
    open
})
</script>